package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.UserApplication;
import com.bwie.common.domain.User;
import com.bwie.mapper.UserMapper;
import com.bwie.service.UserService;
import org.springframework.stereotype.Service;

/**
 * @Author：ShenJiaFeng
 * @Package：com.bwie.service.impl
 * @Project：zg6_yuekao
 * @name：UserServiceImpl
 * @Date：2024/5/17 9:53
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
        implements UserService {
    @Override
    public User findByPhone(String phone) {
//        根据手机号查询用户信息
        return getOne(
                new LambdaQueryWrapper<User>(){{
                    eq(User::getPhone,phone);
                }}
        );
    }
}
